﻿using Awsc.DataAcquisitionSys.Core.Model;
using System.Text.Json.Serialization;


namespace Awsc.DataAcquisitionSys.Core.Models.POCO
{
    public class Mission: EntityBase
    {
        /// <summary>
        /// 负责人
        /// </summary>
        public string ManagerName { get; set; }
        /// <summary>
        /// 备注
        /// </summary>
        public string Remarks { get; set; }
        /// <summary>
        /// 队号
        /// </summary>
        public string TeamID { get; set; }
        /// <summary>
        /// 建设单位
        /// </summary>
        public string Unit { get; set; }
        /// <summary>
        /// 项目地址
        /// </summary>
        public string Location { get; set; }
        /// <summary>
        /// 构造地址
        /// </summary>
        public string ConstructionLocation { get; set; }
        /// <summary>
        /// 井深
        /// </summary>
        public string WellDeep { get; set; }
        /// <summary>
        /// 人工井底
        /// </summary>
        public string ManulBottomHole { get; set; }
        /// <summary>
        /// 填报时间
        /// </summary>
        public DateTime? FillTime { get; set; }
        /// <summary>
        /// 井型
        /// </summary>
        public string WellMode { get; set; }
        /// <summary>
        /// 井别
        /// </summary>
        public string WellType { get; set; }
        /// <summary>
        /// 设计层位
        /// </summary>
        public string DesignLayer { get; set; }
        /// <summary>
        /// 当前层位
        /// </summary>
        public string CurrentLayer { get; set; }
        /// <summary>
        /// 施工类别
        /// </summary>
        public string WorkType { get; set; }
        /// <summary>
        /// 设备型号
        /// </summary>
        public string DeviceMode { get; set; }
        /// <summary>
        /// 施工工序
        /// </summary>
        public string WorkingProcedure { get; set; }
        /// <summary>
        /// 封井器型号
        /// </summary>
        public string WellParkerMode { get; set; }
        /// <summary>
        /// 内防喷器配置情况
        /// </summary>
        public string BopConfiguration { get; set; }
        /// <summary>
        /// 最近一次进口试压情况
        /// </summary>
        public string LatestPresureTest { get; set; }
        /// <summary>
        /// 任务开始时间
        /// </summary>
        public DateTime? CreateTime { get; set; } 
        /// <summary>
        /// 最近一次井口试压时间     
        /// </summary>
        public DateTime? LatestPresureTestTime { get; set; }
        /// <summary>
        /// 任务完成时间
        /// </summary>
        public DateTime? FinishTime { get; set; } 

        public bool IsFinished
        {
            get
            {
                return FinishTime != null;
            }
        }
        [System.Text.Json.Serialization.JsonIgnore]
        [Newtonsoft.Json.JsonIgnore]
        public string SensorDataTableName
        {
            get
            {
                return $"Mission_Sensor_{Id}";
            }
        }
    }
}
